<%--
  Created by IntelliJ IDEA.
  User: GSM
  Date: 2023/11/6
  Time: 16:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
  <title>Input and Display Text</title>
</head>
<body>
<c:choose>
  <c:when test="${empty param.submitted}">
    <form action="${pageContext.request.contextPath}/welcome.jsp">
      name: <input type="text" name="num1">
      <input type="submit" name="submitted" value="submit" /><br />
    </form>
  </c:when>
  <c:otherwise>
    <c:set var="inputText" value="${param.num1}" />
    <p>${inputText}</p>
  </c:otherwise>
</c:choose>
</body>
</html>
